// 引入defineStore用于创建store
import { defineStore } from "pinia";
// 定义并暴露一个store
export const useInfoStore = defineStore('info', {
  state: () => ({
    info: {},
    isLogin: false,
    AudioPlay: false,
    permissions:['1','3']
  }),
  getters: {
    hasPermission: (state) => (requiredPermission) => {
      return state.permissions.includes(requiredPermission);
    }
  },
  persist: true,
});
